<template>
  <div class="header">
    <div class="header-left"><div class="iconfont icon-back">&#xe624;</div></div>
    <div class="header-input"><span class="iconfont">&#xe632;</span>输入城市/景点/游玩主题</div>
    <div class="header-right">
      <router-link to="/city" class="city">
        {{this.city}}
        <span class="iconfont icon-arrow">&#xe62d;</span>
      </router-link>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  },
  data () {
    return {}
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .header
    display flex
    height $headerHeight
    line-height $headerHeight
    background $bgColor
    color #fff
    .header-left
      width 0.64rem
      line-height .86rem
      .icon-back
        display inline-block
        width 100%
        text-align center
    .header-input
      flex 1
      height 0.64rem
      line-height 0.64rem
      margin-top 0.12rem
      margin-left .2rem
      padding-left .2rem
      background #fff
      border-radius .1rem
      color #333
    .header-right
      width 1.6rem
      min-width 1.6rem
      padding 0 .1rem
      line-height .86rem
      text-align center
      .city
        color #fff
      .icon-arrow
        text-align center
</style>
